import http from "@/utils/axios";
let baseUrl = "http://117.72.70.166:7001/";

/**
 * 获取审批数据
 * @param { Number } id
 * @returns
 */
export function getApiWorkFlowData(data) {
  return http.get(`${baseUrl}/bpmnConf/detail/${data.id}`);
}

/**
 * 设置审批数据
 * @param {*} data
 * @returns
 */
export function setApiWorkFlowData(data) {
  return http.post(`${baseUrl}/bpmnConf/edit`, data);
}

/**
 * 获取审批数据列表
 * @param {*} param
 * @returns
 */
export function getFlowSchemaList(param) {
  let paramUri = "?type=" + param.type;
  paramUri += "&name=" + param.name;
  paramUri += "&description=" + param.description;
  return http.get(
    `${baseUrl}/books/${param.currentPage}/${param.pageSize}` + paramUri,
  );
}
